using System;
using System.Web.UI;

using MettleSystems.dashCommerce.Content;
using SubSonic.Utilities;

namespace MettleSystems.dashCommerce.Web.admin
{
	public partial class provider : MettleSystems.dashCommerce.Controls.AdminPage
	{

		#region Member Variables

		private int pageId = 0;
		private int regionId = 0;
		private int providerId = 0;

		#endregion

		protected void Page_Load(object sender, EventArgs e)
		{
			pageId = Utility.GetIntParameter("pageId");
			regionId = Utility.GetIntParameter("regionId");
			providerId = Utility.GetIntParameter("providerId");

			Content.Page _selectedPage = new Content.Page(pageId);
			Provider provider = new Provider(providerId);
			if (provider.EditControl != null) {
				if (provider.EditControl.Length > 0) {
					ProviderControl editControl = Page.LoadControl(provider.EditControl) as ProviderControl;
					editControl.PageId = pageId;
					editControl.RegionId = regionId;
					editControl.ProviderId = providerId;
					providerContent.Controls.Add(editControl);
				}
			}


		}
	}
}